home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / 2499.ZIP / TIMEIT.ZIP / TIMEIT.DOC < prev    next >
Text File  |  1989-02-15  |  1KB  |  39 lines

  1. TIMEIT.C --   Windows program timer application for Microsoft Windows
  2.               Written by Steve Burg
  3.               Adapted from "FREEMEM.C" uploaded by Charles Petzold
  4.  
  5. This is a small windows application program that can be used to time
  6. segments of a windows development programmers code.  The program uses
  7. DDE messages to start and stop timing, displaying the elapsed time in
  8. the icon area.
  9.  
  10. During program development the START_TIMER and STOP_TIMER calls can be
  11. placed in the code to time a event.  The Timeit program will display the
  12. elapsed time between start and stop messages.
  13.  
  14. #include "timeit.h"
  15.    .
  16.    .
  17.    .
  18. START_TIMER(hWnd)
  19.    Code being timed
  20. STOP_TIMER(hWnd)
  21.    .
  22.    .
  23.    .
  24.  
  25. Since the DDE Initiate message uses AddGlobalAtom for the DDE Application
  26. name which the Timeit program deletes.  If the timeit program is not running
  27. when the START_TIMER call is made a GlobalAtom will be left behind in
  28. memory.  GlobalAddAtom stores no more than one copy of a given string in
  29. the atom table, so succesive calls use no more memory, unless the atom
  30. count overflows, leaving calls in during program development should not
  31. cause problems.
  32.  
  33. The program is useful for development programmers, working on optimizing
  34. a section of code.  Complete source code is included for those that
  35. need to modify the code for specific purposes.
  36.  
  37. Steve Burg
  38. 02/15/88
  39.